package config

import (
	"manager/lib/trace_log"
	"manager/utils"
)

const (
	AesKey = "1234567890123456" // AES加密key
	Iv     = "1234567890123456" // AES加密iv
)

var (
	BindWhiteMap = map[string]struct{}{}
)

// InitBindWhiteMap 初始化绑定白名单
func InitBindWhiteMap(whiteList []string) {
	trace_log.CommonLogger.Info("InitBindWhiteMap whiteList:", utils.ToJsonString(whiteList))
	for _, v := range whiteList {
		BindWhiteMap[v] = struct{}{}
	}
}

// IsBindWhite 是否绑定白名单
func IsBindWhite(phone string) bool {
	_, ok := BindWhiteMap[phone]
	return ok
}
